package top.littlejiang.onlinexam.mapper;

import org.apache.ibatis.annotations.Param;
import top.littlejiang.onlinexam.entity.OlexamQuestions;
import top.littlejiang.onlinexam.entity.OlexamStuAnswer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import top.littlejiang.onlinexam.vo.AutoCheckVO;
import top.littlejiang.onlinexam.vo.CheckVO;

import java.util.List;

/**
 * <p>
 * 学生答卷 Mapper 接口
 * </p>
 *
 * @author chen
 * @since 2021-03-11
 */
public interface OlexamStuAnswerMapper extends BaseMapper<OlexamStuAnswer> {

    /**
     * 获取学生答卷 -> 自动阅卷
     *
     * @param userId
     * @param examUuid
     * @return
     */
    List<AutoCheckVO> selectForAuto(@Param("userId") Integer userId, @Param("examUuid") String examUuid);

    /**
     * 查询一条待批阅数据
     *
     * @param examUuid
     * @return
     */
    CheckVO queryToCheck(@Param("examUuid") String examUuid);

    /**
     * 查询题目详情 用作得分统计
     * @param examUuid
     * @param userId
     * @return
     */
    List<OlexamQuestions> selectByQuestions(@Param("examUuid") String examUuid, @Param("userId") Integer userId);
}
